import { ApiProperty } from '@nestjs/swagger';
import { IsBoolean, IsDateString, IsNotEmpty, IsString } from 'class-validator';

export class ShareDto {

  // validator
  @IsString()
  @IsNotEmpty()
  //swagger
  @ApiProperty({
    description: '唯一标识_id',
    type: 'string'
  })
  _id: string;

  @IsBoolean()
  @ApiProperty({
    description: '是否被删除',
  })
  isDeleted: boolean;

  @IsDateString()
  @ApiProperty({
    description: '创建日期',
  })
  createdTime: Date;

  @IsDateString()
  @ApiProperty({
    description: '更新日期',
  })
  updateTime: Date;
}

export const ShareKeysArr: [
  '_id',
  'isDeleted',
  'createdTime',
  'updateTime',
] = [
    '_id',
    'isDeleted',
    'createdTime',
    'updateTime',
  ]